home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / FORTRAN Goodies / FORTRAN Macros for EXCEL / Source Code / DataK2.f < prev   
Encoding:
Text File  |  1992-01-31  |  1.0 KB  |  51 lines  |  [TEXT/MPS ]

  1. !!MP Inlines.f
  2.  
  3. C    An example of a FORTRAN Resource for Microsoft Excel 3.0
  4. C    This example call illustrates the use of the Passing and Returning a
  5. C    Pointer to an Array Structure, Data Type K. Testing for this example
  6. C    was done with Language Systems FORTRAN version 3.0
  7. C    
  8. C    Below are the commands that were executed to create the 
  9. C    code resource
  10.  
  11. !!IFC FALSE
  12.  FORTRAN DATAK2.f -opt=1 -noimplicit
  13. Link -w -f -srt -ad 4 -t '????' -c '????' ∂
  14. -m DATAK2 -sn Main=DATAK2 ∂
  15. -sn f_RunTime=DATAK2 ∂
  16. -sn f_Intrinsics=DATAK2 ∂
  17.     DATAK2.f.o ∂
  18.     "{FLibraries}"OutpwStubs.o ∂
  19.     "{Libraries}"Runtime.o ∂
  20.     "{Libraries}"Interface.o ∂
  21.     "{FLibraries}"FORTRANlib.o ∂
  22.     "{FLibraries}"IntrinsicLib.o ∂
  23.     "{FLibraries}"FSANELib.o ∂
  24.     -o DATAK2.rsc
  25. !!ENDC
  26.  
  27. C    Source code
  28.  
  29.     integer*4 function DATAK2(%val(a))
  30.     
  31.     integer*2 i,items
  32.     
  33.     structure /fp/
  34.         integer*2 rows
  35.         integer*2 columns
  36.         real*8    dparray(100)
  37.     end structure
  38.     
  39.     pointer /fp/ a
  40.         
  41.     items = a^.rows * a^.columns
  42.     do i = 1,items
  43.         a^.dparray(i) = a^.dparray(i) * 2
  44.     enddo
  45.     DATAK2 = a
  46.     
  47.     return
  48.     end
  49.     
  50.         
  51.